import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from '../views/index'
import Charge from '../views/charge'
import Free from '../views/free'
import Detail from '../views/detail'
import About from '../views/about'
import More from '../views/more'
import Contact from '../views/contact'

Vue.use(VueRouter)

const routes = [
  {
    path: '*',
    redirect: '/index'
  }, {
    path: '/index',
    name: '/index',
    component: Index
  }, {
    path: '/charge',
    name: '/charge',
    component: Charge
  }, {
    path: '/free',
    name: '/free',
    component: Free
  }, {
    path: '/detail',
    name: '/detail',
    component: Detail
  }, {
    path: '/about',
    name: '/about',
    component: About
  }, {
    path: '/more',
    name: '/more',
    component: More
  }, {
    path: '/contact',
    name: '/contact',
    component: Contact
  }
]

const router = new VueRouter({
  //mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router